/*****************************************************
Copyright (C) 2020. All rights reserved.
File name     ：TestMain.c
Version       ：v1.0
Author        ：zhengqijun
Date          ：2020-04-06
Function List ：
Description   ：main function
******************************************************/

#include <stdio.h>  // for printf
#include "InsertionSort.h"

#define MaxSize (50)

// PrintArray for testing
static void PrintArray(ElementType A[], int N);

void PrintArray(ElementType A[], int N) {
    int i = 0;

    printf("Print Array:[ ");
    for (i = 0; i < N; ++i) {
        printf("%d ", A[i]);
    }
    printf("]\n");
}

// main function
int main(void) {
    ElementType arr[MaxSize] = {14, 60, 57, 32, 99, 63, 84, 11, 53, 25};
    int Size = 10;

    printf("Array before sort\n");
    PrintArray(arr, Size);

    InsertionSort(arr, Size);

    printf("Array after sort\n");
    PrintArray(arr, Size);

    return 0;
}

// EOF

